<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>v-if v-show v-for</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <div v-if="showif">if</div>
        <div v-show="showshow">seen</div>
        <button @click="handlerClick1">点我1</button>
        <button @click="handlerClick2">点我2</button>
        <div v-for="user in users">
           <div> id:{{user.id}}</div>
            <div>name:{{user.name}}</div>
        </div>
    </div>
    <script>
        new Vue({
            el:"#app",
            data:{
                msg:"hello world",
                showif:true,
                showshow:true,
                users:[{"id":1,"name":"xlss"},{"id":2,"name":"ximy"},{"id":3,"name":"brkh"}]
            },
            methods:{
                handlerClick1: function() {
                    this.showif = !this.showif
                },
                handlerClick2: function() {
                    this.showshow = !this.showshow
                }
            }
        })
    </script>
</body>
</html>